﻿//Write a program that, depending on the user's choice inputs int, double or string variable. 
//If the variable is integer or double, increases it with 1. If the variable is string, appends "*" at its end. 
//The program must show the value of that variable as a console output. Use switch statement.

using System;
using System.Globalization;
using System.Threading;

class Add1OrStarToInput
{
    static void Main()
    {
        Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
        Console.WriteLine("Choice number corresponding to requested input type");
        Console.WriteLine("1 - Integer number");
        Console.WriteLine("2 - Double number");
        Console.WriteLine("3 - String");
        Console.Write("Enter: ");
        string inputTypeString = Console.ReadLine();
        Console.Write("");
        byte inputType;
        if (byte.TryParse(inputTypeString, out inputType))
        {
            switch (inputType)
            {
                case 1:
                    Console.Write("Enter integer number: ");
                    int intInput = int.Parse(Console.ReadLine());
                    Console.Write("The new values is: {0}", intInput + 1);
                    break;
                case 2:
                    Console.Write("Enter integer number: ");
                    double doubleInput = double.Parse(Console.ReadLine().Replace(",", "."));
                    Console.Write("The new values is: {0}", doubleInput + 1);
                    break;
                case 3:
                    Console.WriteLine("Enter integer number: ");
                    string stringInput = Console.ReadLine();
                    Console.Write("The new values is: {0}", stringInput + "*");
                    break;
                default:
                    Console.Write("Ivalid input !");
                    break;
            }
        }
        else
        {
            Console.WriteLine("Not a valid choice.");
        }
        Console.WriteLine();
    }
}
